package com.example.xd.default_call

import java.util.*


/**
 * @auther XuDan on 2020/7/14.
 */
class TimeFormatUtil private constructor() {
    companion object {
        val instance: TimeFormatUtil by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) { TimeFormatUtil() }
    }

    fun stringForTime(time: Long): String {
        var seconds: Long = time % 60;
        var minutes: Long = (time / 60) % 60;
        return Formatter().format("%02d:%02d", minutes, seconds).toString()
    }
}